package com.ziyueyuwen.xiniao.bean;


import com.ziyueyuwen.xiniao.handler.common.ArrayList2StringBaseHandler;
import com.ziyueyuwen.xiniao.handler.common.ArrayList2StringHandler;
import org.apache.ibatis.type.ArrayTypeHandler;
import org.apache.ibatis.type.JdbcType;
import tk.mybatis.mapper.annotation.ColumnType;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
import java.util.List;
/**
 * @author wancheng
 */
public class ZyOrderAddress {
    @Id
    @GeneratedValue(generator = "JDBC")
    private Integer id;

    @Column(name = "consignee")
    private String consignee;

    @Column(name = "consignee_account")
    private String consigneeAccount;

    @ColumnType(column = "area",jdbcType = JdbcType.VARCHAR,typeHandler = ArrayList2StringBaseHandler.class)
    private List<String> area;

    @Column(name = "address")
    private String address;

    @Column(name = "create_user_account")
    private String createUserAccount;

    @Column(name = "create_time")
    private Date createTime;

    public Integer getId() {
        return id;
    }

    public ZyOrderAddress setId(Integer id) {
        this.id = id;
        return this;
    }

    public String getConsignee() {
        return consignee;
    }

    public ZyOrderAddress setConsignee(String consignee) {
        this.consignee = consignee == null ? null : consignee.trim();
        return this;
    }

    public String getConsigneeAccount() {
        return consigneeAccount;
    }

    public ZyOrderAddress setConsigneeAccount(String consigneeAccount) {
        this.consigneeAccount = consigneeAccount == null ? null : consigneeAccount.trim();
        return this;
    }

    public List<String> getArea() {
        return area;
    }

    public ZyOrderAddress setArea(List<String> area) {
        this.area = area;
        return this;
    }

    public String getAddress() {
        return address;
    }

    public ZyOrderAddress setAddress(String address) {
        this.address = address == null ? null : address.trim();
        return this;
    }

    public String getCreateUserAccount() {
        return createUserAccount;
    }

    public ZyOrderAddress setCreateUserAccount(String createUserAccount) {
        this.createUserAccount = createUserAccount == null ? null : createUserAccount.trim();
        return this;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public ZyOrderAddress setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
}